<template>
    <div class="detail">
        <h1>讲师详情页面</h1>
        <p>ID：{{ list.id }}</p>
        <p>用户名：{{ list.name }}</p>
        <p>昵称：{{ list.nick }}</p>
        <p v-text="list.sex == 1 ? '性别：女' : list.sex == 0 ? '性别：男' : '性别：未知'"></p>
        <p>生日：{{ list.birthdata }}</p>
        <p>手机号：{{ list.iphone }}</p>
        <p v-text="list.teachertype == 1 ? '讲师类型：讲师' : list.teachertype == 2 ? '讲师类型：班主任' : '讲师类型：未知'"></p>
        <button @click="fanhui()">返回讲师列表</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            list: []
        }
    },
    methods: {
        //返回教师列表页面
        fanhui() {
            this.$router.push('/about/home')

        }
    },
    components: {

    },
    created() {
        //获取路由参数
        this.list = this.$route.query.item;

    }
}
</script>

<style less>
.detail {
    width: 85vw;
    height: 85vh;
    background-color: white;
    position: absolute;
    top: 12vh;
    left: 12vw;
    overflow: auto;

    p {
        width: 200px;
        height: 20px;
        padding: 20px;
        font-size: 16px;
    }
    h1{
        width: 200px;
        height: 20px;
        padding: 20px;
        font-size: 22px;
    }
    button {
        width: 150px;
        height: 40px;
        background-color: rgb(235, 218, 175);
        color: white;
        margin-left: 20px;
        font-size: 16px;
    }
    
}
</style>
